package com.supermarket.api.web;

import com.supermarket.api.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * 支付宝接口
 * @author 李其伟
 * @date 2023/12/15
 */
@Controller
@RequestMapping("/aliPay")
public class AliPayController {

    /**
     * 支付服务层
     */
    @Autowired
    private PayService payService;

    @ResponseBody
    @PostMapping("/notify")
    public String notify(HttpServletRequest request) {
        System.out.println("这是支付宝回调");
        return "success";
    }

}
